<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<!--@标记 ,引入静态资源 css，js,jpg 等; 表单提交 -->
<link rel="stylesheet" th:href="@{/bootstrap/css/bootstrap.css}">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
   <div class="container">

       <table border="1" class="table table-bordered table-hover">
           <thead>
           <tr>
               <th>商品编号</th>
               <th>商品名称</th>
               <th>商品价格</th>
               <th>商品描述</th>
           </tr>
           </thead>
           <tbody>
           <!--thymeleaf中进行遍历, ${users} ognl 作用域-->
           <tr th:each="gd: ${goods}">
               <td th:text="${gd.goodsid}"></td>
               <td th:text="${gd.goodsname}"></td>
               <td th:text="${gd.goodsprice}"></td>
               <td th:text="${gd.goodsinfo}"></td>
           </tr>
           <hr>

           <tr th:each="gd: ${goods}" th:object="${gd}">
               <td th:text="*{goodsid}"></td>
               <td th:text="*{goodsname}"></td>
               <td th:text="*{goodsprice}"></td>
               <td th:text="*{goodsinfo.substring(0,1)}"></td>
           </tr>
           <hr>

           </tbody>
       </table>



   </div>
</body>
</html>